<?php
require_once 'header.php';
$page_title = 'eTAT: My eTAT';

if($params->c != '') {
	$course = $instructor->getCourse($params->c);
	$groups = $course->getAllGroups();
} else {
	//redirect('myetat.php');
}

$courseList = $instructor->getAllCourses();
		
		
?>
  <div id="categories">
 <?php include_once('./leftmenu.php');?>
  </div>
  <div id="main2">
    <h1> Generate Report</h1>
    <table id="hor-minimalist-a" summary="report">
    <thead>
    	<tr>
          <td  colspan="2"><h2>Please Customize the Report by choosing the information below:</h2></td>
          </tr>
          <tr>
          <td  colspan="2">To refresh to the latest data <a href="">click here</a>(might take a few sec)</td>
          </tr>
           <tr>
        <td><b>1. Select course</b></td>
        <td>
        <select name="coursewise" id="coursewisedd"  size="2"   multiple  >
         <?php 
 
		
		if($courseList != null) {
			$count = 0;
			 foreach($courseList as $cr) {	 	 
			 
				 print "<option value='$cr->id' >".ucfirst($cr->title)."</option>";
				 $count++;
				 
				}
				
			}
		  
		   ?>
         
        </select> 
        
        </td>
        </tr>
          <tr>
        <td><b>2. Select scope</b></td>
        <td>
        <div id="drpdown">
        <select name="grpwise"  id="grpwisedd"   size="2" multiple onccChange="showGroup(this)">
        <option value="c" >Coursewise </option>
        <option value="g" >Groupwise </option>
         
        </select> 
        </div>
        
        <div id='selbox' style="display:none">      
 
        </div>
        
        </td>
        </tr>
        <tr>
          <td><b>3. Check to show instructor's Annotation</b></td>
          <td> 
          Yes:&nbsp;&nbsp;&nbsp;<input type= "radio" name="Annotation">
          No:&nbsp;&nbsp;&nbsp;<input type= "radio" name="Annotation">
          </td>
          </tr>
           <tr>
          <td><b>4. Choose usage data</b></td>
          <td> 
            <input type="checkbox" name="usagedata" value="Email"  />&nbsp;&nbsp;&nbsp;Email: <br />
            <input type="checkbox" name="usagedata" value="discussion"  />&nbsp;&nbsp;&nbsp;Discussion Forums: <br />
            <input type="checkbox" name="usagedata" value="svncommit"  />&nbsp;&nbsp;&nbsp;SVN Commits <br />
            <input type="checkbox" name="usagedata" value="issuetracking"  />&nbsp;&nbsp;&nbsp;Issue Tracking: 

          </td>
          </tr>
          <td><b>5. Choose Survey Questions</b></td>
          <td> 
          Yes:&nbsp;&nbsp;&nbsp;<input type= "radio" name="survey">
          No:&nbsp;&nbsp;&nbsp;<input type= "radio" name="survey">

          </td>
          </tr>
        <tr><td colspan="2" align="right"><a href="report.php"><input type="button" value="Submit"></a></td></tr>
    </tbody>
</table>

    
  
  </div>
</div>
<?php require_once 'footer.php'; ?>
 </div>

</body>
</html>
<script type="text/javascript" language="javascript1.3" >
	function showGroup(obj){
	     //alert(document.getElementById('coursewisedd').value);
		
		//if(document.getElementById('coursewisedd').value){}else{alert('Please Select a course!'); return false;}
 
		var val = obj.value;
		
		if(val=="c"){
			document.getElementById('selbox').style.display = "none";
		}else if(val=="g"){
	   		document.getElementById('selbox').style.display = "inline";
		}else{
			document.getElementById('selbox').style.display = "none";		
		}
	}
	
</script>